home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: New Zealand Amiga Users Group
/
New Zealand Amiga Users Group Newsdisk v25 (1989-08)(NZAmigaUG).zip
/
New Zealand Amiga Users Group Newsdisk v25 (1989-08)(NZAmigaUG).adf
/
StrucBrowser
/
sb.src.zoo
/
sbexecbase.c
< prev
next >
Wrap
C/C++ Source or Header
|
1988-06-22
|
5KB
|
143 lines
/************************************************************************
* *
* SBExecBase *
* *
* by David Annett, 3 Sutherland Ave, Upper Hutt, New Zealand *
* *
* 17 July 89 *
* *
*************************************************************************/
#include "sb.h"
extern int level;
extern struct ExecBase *ExecBase;
extern void PrExecBase2();
extern void PrExecBase3();
void PrExecBase(string, EBase) char *string; struct ExecBase *EBase;
{
static struct StructData structdata[] = {
{ " LibNode", "struct Library", 0, SZ(Library) },
{ "-SoftVer", "UWORD", 12, INTSIZE },
{ "-LowMemChkSum", "WORD", 2, INTSIZE },
{ "(ColdCapture", "APTR)", 5, PTRSIZE },
{ "(CoolCapture", "APTR)", 5, PTRSIZE },
{ "(WarmCapture", "APTR)", 5, PTRSIZE },
{ "(SysStkUpper", "APTR)", 5, PTRSIZE },
{ "(SysStkLower", "APTR)", 5, PTRSIZE },
{ "-MaxLocMem", "ULONG", 12, PTRSIZE },
{ "(DebugEntry", "APTR)", 5, PTRSIZE },
{ "(DebugData", "APTR)", 5, PTRSIZE },
{ "(AlertData", "APTR)", 5, PTRSIZE },
{ "(MaxExtMem", "APTR)", 5, PTRSIZE },
{ "-ChkSum", "UWORD", 12, INTSIZE },
{ "(IntVects[16]", "struct IntVector)", 5, SZ(IntVector) * 16 },
{ "(ThisTask", "struct Task *)", 5, PTRSIZE }
};
int sum, choice = -1;
level++;
while (choice) {
sum = SetOptionText(string, structdata, (APTR)EBase, DATASIZE, 0);
switch (choice = GetChoice(MAXGADG + 1)) {
case 1:
PrLibrary ("Exec base library node", &EBase->LibNode);
break;
case MOREGADG:
PrExecBase2(" ExecBase (page 2)", EBase, sum);
break;
}
}
level--;
}
void PrExecBase2(string, EBase, offset) char *string; struct ExecBase *EBase;
int offset;
{
static struct StructData structdata[] = {
{ "-IdleCount", "ULONG", 12, PTRSIZE },
{ "-DispCount", "ULONG", 12, PTRSIZE },
{ "-Quantum", "UWORD", 12, INTSIZE },
{ "-Elapsed", "UWORD", 12, INTSIZE },
{ "-SysFlags", "UWORD", 12, INTSIZE },
/* { "-IDNestCnt", "BYTE", 2, BYTESIZE },
{ "-TDNestCnt", "BYTE", 2, BYTESIZE },*/
{ "-IDNestCnt", "BYTE", 2, INTSIZE },
{ "-TDNestCnt", "BYTE", 2, INTSIZE },
{ "-AttnFlags", "UWORD", 12, INTSIZE },
{ "-AttnResched", "UWORD", 12, INTSIZE },
{ "(ResModules", "APTR)", 5, PTRSIZE },
{ "(TaskTrapCodes","APTR)", 5, PTRSIZE },
{ "(TaskExceptCde","APTR)", 5, PTRSIZE },
{ "(TaskExitCode", "APTR)", 5, PTRSIZE },
{ "-TaskSigAlloc", "ULONG", 12, PTRSIZE },
{ "-TaskTrapAlloc","UWORD", 12, INTSIZE },
{ " MemList", "struct List", 5, SZ(List) }
};
int sum, choice = -1;
UWORD bits;
level++;
while (choice) {
sum = SetOptionText(string, structdata, (APTR)EBase, DATASIZE, offset);
switch (choice = GetChoice(MAXGADG + 1)) {
case 16:
PrList("Exec's MemList List structure",&EBase->MemList);
break;
case MOREGADG:
PrExecBase3(" ExecBase (page 3)", EBase, sum);
break;
}
}
level--;
}
void PrExecBase3(string, EBase, offset) char *string; struct ExecBase *EBase;
int offset;
{
static struct StructData structdata[] = {
{ " ResourceList", "struct List", 5, SZ(List) },
{ " DeviceList", "struct List", 5, SZ(List) },
{ " IntrList", "struct List", 5, SZ(List) },
{ " LibList", "struct List", 5, SZ(List) },
{ " PortList", "struct List", 5, SZ(List) },
{ " TaskReady", "struct List", 5, SZ(List) },
{ " TaskWait", "struct List", 5, SZ(List) },
{ "(SoftInts[5]", "struct SoftIntList)", 5, SZ(SoftIntList) * 5 },
{ " LastAlert[4]", "ULONG", 0, PTRSIZE * 4 }
};
int sum, choice = -1;
UWORD bits;
level++;
while (choice) {
sum = SetOptionText(string, structdata, (APTR)EBase, DATASIZE, offset);
switch (choice = GetChoice(DATASIZE)) {
case 1:
PrList("Exec's ResourceList List structure",&EBase->ResourceList);
break;
case 2:
PrList("Exec's DeviceList List structure",&EBase->DeviceList);
break;
case 3:
PrList("Exec's IntrList List structure",&EBase->IntrList);
break;
case 4:
PrList("Exec's LibList List structure",&EBase->LibList);
break;
case 5:
PrList("Exec's PortList List structure",&EBase->PortList);
break;
case 6:
PrList("Exec's TaskReady List structure",&EBase->TaskReady);
break;
case 7:
PrList("Exec's TaskWait List structure",&EBase->TaskWait);
break;
case 9:
HexDump("Hexdump of LastAlert Long words",&EBase->LastAlert[0],
PTRSIZE, (long)PTRSIZE * 4);
break;
}
}
level--;
}